package com.nuoniu.sibanyun.entity.check;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 质检管理_主表
 * </p>
 *
 * @author 白强
 * @since 2021-07-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("qu_check_main")
@ApiModel(value="VQualityCheckMain对象", description="质检管理_主表")
public class VQualityCheckMain extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "公司id")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "账套id")
    @TableField("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "数据来源")
    @TableField("data_source")
    private String dataSource;

    @ApiModelProperty(value = "单据日期(检验日期)")
    @TableField("voucher_date")
    private LocalDate voucherDate;

    @ApiModelProperty(value = "单据编号(检验单号)")
    @TableField("voucher_code")
    private String voucherCode;

    @ApiModelProperty(value = "单据状态")
    @TableField("voucher_state")
    private Integer voucherState;

    @ApiModelProperty(value = "业务类型(检验类型)：41.采购 42.委外加工检验 43.产品检验 44.自制工序检验")
    @TableField("business_type")
    private Integer businessType;

    @ApiModelProperty(value = "检验员ID")
    @TableField("check_user_id")
    private Integer checkUserId;

    @ApiModelProperty(value = "检验员姓名")
    @TableField("check_user_name")
    private String checkUserName;

    @ApiModelProperty(value = "来源单据ID")
    @TableField("source_voucher_id")
    private Integer sourceVoucherId;

    @ApiModelProperty(value = "来源单据号")
    @TableField("source_voucher_code")
    private String sourceVoucherCode;

    @ApiModelProperty(value = "来源单据")
    @TableField("source_voucher_type")
    private String sourceVoucherType;

    @ApiModelProperty(value = "来源日期")
    @TableField("source_voucher_date")
    private LocalDate sourceVoucherDate;

    @ApiModelProperty(value = "生产车间id")
    @TableField("office_id")
    private Integer officeId;

    @ApiModelProperty(value = "生产车间名称")
    @TableField("office_name")
    private String officeName;

    @ApiModelProperty(value = "供应商")
    @TableField("vendor_id")
    private Integer vendorId;

    @ApiModelProperty(value = "供应商名称")
    @TableField("vendor_name")
    private String vendorName;

    @ApiModelProperty(value = "校验结果")
    @TableField("check_result")
    private Boolean checkResult;

    @ApiModelProperty(value = "制单ID")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "制单人姓名")
    @TableField("create_user_name")
    private String createUserName;

    @ApiModelProperty(value = "制单日期")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "审核人ID")
    @TableField("reviewer_user_id")
    private Integer reviewerUserId;

    @ApiModelProperty(value = "审核人姓名")
    @TableField("reviewer_user_name")
    private String reviewerUserName;

    @ApiModelProperty(value = "审核日期")
    @TableField("reviewer_date")
    private LocalDate reviewerDate;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "总数量")
    @TableField("total_quantity")
    private BigDecimal totalQuantity;

    @ApiModelProperty(value = "累计执行数量")
    @TableField(exist = false)
    private BigDecimal cumExecuteQuantity;


    @TableField(exist = false)
    private List<VQualityCheckDetail> orderDetailList;


}
